package cn.iocoder.yudao.module.forward.dal.mysql.testsend;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.forward.dal.dataobject.testsend.TestSendDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.forward.controller.admin.testsend.vo.*;

/**
 * 演练发布 Mapper
 *
 * @author zhang
 */
@Mapper
public interface TestSendMapper extends BaseMapperX<TestSendDO> {

    default PageResult<TestSendDO> selectPage(TestSendPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TestSendDO>()
                .eqIfPresent(TestSendDO::getType, reqVO.getType())
                .eqIfPresent(TestSendDO::getBrokerId, reqVO.getBrokerId())
                .betweenIfPresent(TestSendDO::getTestTime, reqVO.getTestTime())
                .betweenIfPresent(TestSendDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(TestSendDO::getId));
    }

}